﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sharp.Domain.PlatformBoundedContext.MessageModule.Aggregates;

namespace Sharp.Domain.PlatformBoundedContext.ModelConfigurations
{
    public partial class MessageConfiguration
        : EntityTypeConfiguration<Message>
    {
        public MessageConfiguration()
        {
            HasKey(x => x.Id);

            Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();

            Property(t => t.Content)
                .IsOptional();
        }
    }
}

